Cogeneration of electric power and heat